﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Taoyl.CodeTraceDAL
{
    public class SqlSugarHelper
    {
        public static string ConnectionString { get; set; } = string.Empty;

        public static SqlSugarClient SqlSugarClient { 
            get 
            {
                SqlSugarClient sqlSugarClient =new SqlSugarClient(new ConnectionConfig()
                {
                    ConnectionString = ConnectionString,
                    DbType=DbType.MySql,
                    IsAutoCloseConnection = true,
                });
                sqlSugarClient.Aop.OnLogExecuting = (sql,pars) =>
                {

                };
                return sqlSugarClient;
            }
        }
    }
}
